package com.cmcc.groupcontacts.firewall.dao.model;

import android.content.ContentValues;

/**
 * 来电拦截记录数据模型
 * 
 * @author 
 * 
 */
public class CallListVO extends CallInfoVO {
	private static final long serialVersionUID = 4417823497253812283L;

	/** 骚扰电话 */
	public static final int TYPE_DISTURB = 0;
	/** 骚扰电话 */
	public static final String TYPE_DISTURB_TEXT = "骚扰电话";
	/** 其他 */
	public static final int TYPE_OTHER = 1;
	/** 其他 */
	public static final String TYPE_OTHER_TEXT = "";

	private Integer id;
	private int duration;
	private int type;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public int getDuration() {
		return duration;
	}

	public void setDuration(int duration) {
		this.duration = duration;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public static class MetaData {
		public static final String ID = "id";
		public static final String NUMBER = CallInfoVO.MetaData.NUMBER;
		public static final String NAME = CallInfoVO.MetaData.NAME;
		public static final String DATE = CallInfoVO.MetaData.DATE;
		public static final String DURATION = "duration";
		public static final String TYPE = "type";
		public static final String[] ALL_COLS = { ID, NUMBER, NAME, DATE, DURATION, TYPE };
		public static String CREATE_DDL = "CREATE TABLE call_list (id INTEGER PRIMARY KEY,number TEXT,name TEXT,date INTEGER,duration INTEGER,type INTEGER);";
	}

	@Override
	public ContentValues parse2ContentValues() {
		super.parse2ContentValues();
		
		putValue(MetaData.ID, id);
		putValue(MetaData.DURATION, duration);
		putValue(MetaData.TYPE, type);
		return contentValues;
	}
}
